/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.schedule.core.domain.action;


import cn.hutool.core.bean.BeanUtil;
import info.peigen.hotpot.component.schedule.core.domain.ScheduleJob;
import info.peigen.hotpot.component.schedule.core.repository.entity.ScheduleJobEntity;
import info.peigen.hotpot.component.schedule.facade.command.result.info.ScheduleJobManageInfo;

/**
 * <b>(ScheduleJobConvertor)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2022/12/30
 */
public class ScheduleJobConvertor {
    public static ScheduleJobEntity convert(ScheduleJob domain) {
        return BeanUtil.copyProperties(domain, ScheduleJobEntity.class);
    }

    public static ScheduleJob convert(ScheduleJobEntity entity) {
        return BeanUtil.copyProperties(entity, ScheduleJob.class);
    }

    public static ScheduleJobManageInfo convertToInfo(ScheduleJob domain) {
        return BeanUtil.copyProperties(domain, ScheduleJobManageInfo.class);
    }

    public static ScheduleJobManageInfo convertToInfo(ScheduleJobEntity entity) {
        return BeanUtil.copyProperties(entity, ScheduleJobManageInfo.class);
    }

}